#include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
using namespace cv;
int main()
{
    std::string image_path = samples::findFile("xing.jpg");
    Mat img = imread(image_path, IMREAD_COLOR);
    if (img.empty())
    {
        std::cout << "Could not read the image: " << image_path << std::endl;
        return 1;
    }
    namedWindow("窗口1", WINDOW_AUTOSIZE);   
    imshow("窗口1", img);  //在“窗口1”这个窗口输出图片。
    int k = waitKey(0);
    if (k == 's')
    {
        imwrite("image_save.jpg", img);
    }
    return 0;
}
